package mcommand;

import java.util.Observable;
import mcommand.Statistics.StatisticType;

/**
 * Handles the statistic, notify the Observers if
 * a statistic type has changed.
 *
 * @author Marcel, Christian, Klaus
 *
 */
public class StatisticsHandler extends Observable {

    /**
     * Calls the setChanged method and notify
     * the Observers that the statistic type has
     * changed to ROCKET_FIRED.
     */
    public final void rocketFired() {
        setChanged();
        notifyObservers(StatisticType.ROCKET_FIRED);
    }

    /**
     * Calls the setChanged method and notify
     * the Observers that the statistic type has
     * changed to ROCKET_HIT.
     */
    public final void rocketHit() {
        setChanged();
        notifyObservers(StatisticType.ROCKET_HIT);
    }
}
